#include <cmath>
#include <iostream>
#include <vector>
using namespace std;

class Solution {
  public:
    int maxArea(vector<int> &height) {
        int left = 0, right = height.size() - 1;
        int size = min(height[left], height[right]) * (right - left);
        while (left < right) {
            if (height[left] <= height[right]) {
                left++;
            } else {
                right--;
            }
            int newSize = min(height[left], height[right]) * (right - left);
            if (size < newSize) {
                size = newSize;
            }
        }
        return size;
    }
};

int main(int argc, char const *argv[]) {
    cout << "test" << endl;
    return 0;
}
